package com.xunfang.cloud.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xunfang.cloud.common.enties.Pay;
import com.xunfang.cloud.mapper.PayMapper;
import com.xunfang.cloud.service.PayService;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author scott
* @description 针对表【t_pay(支付交易表)】的数据库操作Service实现
* @createDate 2025-10-31 10:35:25
*/
@Service
public class PayServiceImpl extends ServiceImpl<PayMapper, Pay>
    implements PayService {

    @Resource
    PayMapper payMapper;

    @Override
    public int add(Pay pay){
        return payMapper.insert(pay);
    }
    @Override
    public int delete(Integer id){
        return payMapper.deleteById(id);
    }
    @Override
    public int update(Pay pay){
        return payMapper.updateById(pay);
    }
    @Override
    public Pay getById(Integer id){
        return payMapper.selectById(id);
    }
    @Override
    public List<Pay> getAll(){
        return payMapper.selectList(null);
    }

}




